﻿@model ExamplePageViewModel
@inject ICofoundryTemplateHelper<ExamplePageViewModel> Cofoundry

@Cofoundry.Template.UseDescription("This template should only be used for the homepage")

<div class="hero-banner">
    <img src="/content/images/hero-banner-bg.jpg" asp-append-version="true">
    <div class="hero-banner__overlay"></div>
</div>

<div class="container">
    <div class="row content-block">
        <div class="col-sm-12">
            <h1>
                @(await Cofoundry
                    .Template
                    .Region("Introduction Title")
                    .EmptyContentMinHeight(100)
                    .AllowBlockType<PlainTextDataModel>()
                    .InvokeAsync())
            </h1>

            @(await Cofoundry
                .Template
                .Region("Introduction")
                .AllowBlockType<RichTextWithMediaDataModel>()
                .AllowBlockType<PageListDataModel>()
                .AllowBlockType< CarouselDataModel>()
                .EmptyContentMinHeight(200)
                .AllowMultipleBlocks()
                .InvokeAsync())
        </div>
    </div>

    <div class="row blog-cards">
        <div class="col-sm-12">
            <h2>From our blog</h2>
        </div>

        @await Component.InvokeAsync("HomepageBlogPosts")
    </div>
</div>
    